home *** CD-ROM | disk | FTP | other *** search
/ Internet Info 1994 March / Internet Info CD-ROM (Walnut Creek) (March 1994).iso / networking / news / readers / rn / rn.4.4.patch.3.part.3 < prev    next >
Encoding:
Text File  |  1992-02-23  |  46.7 KB  |  1,507 lines

  1. This is rn 4.4 patch number 3 Part 3 of 3
  2.  
  3. Please note that rn 4.4 on lib.tmc.edu, gazette.bcm.tmc.edu, bcm.tmc.edu
  4. and tmc.edu have all been updated to rn 4.4.3 and have this patch installed.
  5.  
  6. Description: [Most changes came from trn's author, Wayne Davison]
  7.  
  8.    o    Configure changes:  check for active.times (see new-group comments
  9.     below), termios systems (see termios comments later on), and also
  10.     ask if ORGANIZATION should be ignored.  This latter change allows
  11.     systems that use the ORGANIZATION variable for their own purposes
  12.     a chance to only use NEWSORG, thus allowing them to take advantage
  13.     of the default if NEWSORG is undefined (without this, everyone who
  14.     uses rn would _have_ to define NEWSORG to avoid the ORGANIZATION
  15.     define).
  16.    o    Pnews.SH: support ignoring of ORGANIZATION; echo --> $echo;
  17.     cat --> $cat.
  18.    o    Rnmail.SH: support ignoring of ORGANIZATION.
  19.    o    Many files: I've change the parameters of any function trying to
  20.     pass a character (including bool) into a type_int (e.g. char_int).
  21.     This avoids errors for ANSI compilers that don't believe that the
  22.     promoted argument type is valid (they try to pass a char as a char,
  23.     without promoting it to an int, and complain about the old syntax).
  24.    o    addng.c:  the new new-group-finding code is in here.  Optimized the
  25.     writing/reading of newsgroup lists by using "w+" and rewinding the
  26.     file.  If ACTIVE_TIMES is defined, the new function find_new_groups()
  27.     uses the NEWGROUPS command (in NNTP) or the ACTIVE_TIMES file (in
  28.     regular rn) to determine new groups.  If it's not defined, then the
  29.     find_new_groups() function does the old method (using the code moved
  30.     here from init.c).
  31.    o    added the DEB_NNTP define to output some useful NNTP debugging info
  32.     without having all information scroll by like it does with the NNTP
  33.     clientlib's debugging turned on.
  34.    o    I optimized a few of the sscanf's to use "%*d" to skip numbers
  35.     that were being ignored, and removed the useless variables.
  36.    o    art.c:  enhanced the Newsgroups-magic code to show the Newsgroups
  37.     line if it doesn't match the current group.  I find this really
  38.     useful for browsing through junk or seeing which articles have
  39.     been redirected with C new's '=' directive.
  40.    o    autosub.c:  reordered the include files to avoid a problem with
  41.     ANSI compilers.
  42.    o    bits.c:  fixed a bug in the instr() call in the !NORELAY section
  43.     (the ", TRUE" was in the wrong place).
  44.    o    common.h, etc:  if TERMIOS is defined, include termios.h and use
  45.     some slightly different term functions.  Configure was smart enough
  46.     to NOT set this for suns, and a few other systems that don't like it.
  47.    o    common.h:  if __STDC__ is defined, turn on the ANSI() prototypes
  48.     automatically.
  49.    o    common.h:  nullstr[] = ""; actually generates a warning(!) on some
  50.     weird compilers -- changed to nullstr[1] = "";.
  51.    o    common.h:  "Can't recreate..." message is used in the .newnewsrc
  52.     writing code.
  53.    o    config.h.SH:  conditionalize the including of the config.sh file
  54.     like the other .SH files do.  Also added the new Configure stuff.
  55.    o    config.h.SH needs to have its RCS comment character changed to "# ".
  56.    o    config.h.SH:  all the changes in the tail end are tab/space changes
  57.     that force the code to look pretty in config.h no matter if it is
  58.     preceded by a "#define" or a "/*#undef".
  59.    o    final.c:  int_catcher() needs an int parameter to agree with ANSI
  60.     compilers.  sig_catcher() had an assumed int parameter warning.
  61.    o    init.c:  more new-group changes (i.e. it calls find_new_groups(),
  62.     and the old new-group code was moved to addng.c).
  63.    o    intrp.c:  changes to support ignoring ORGANIZATION.  A slight tweak
  64.     allows the organization file not not end in a newline.
  65.    o    intrp.c:  moved the tmpbuf[] into the #ifdefs where it is used (to
  66.     avoid an "unused" warning.  In the process, discovered a bug in the
  67.     non-BSD code that tries to copy an uninitialized (now undefined) tmpbuf
  68.     into buf (when it should be copying 's').
  69.    o    last.c:  extended the contents of .rnlast to support the new-group
  70.     code.  Handles reading the old .rnlast style gracefully.
  71.    o    ng.c:  reset the value of extractdest and extractprog when entering
  72.     a newsgroup.  This allows someone to set SAVEDIR to a roving value
  73.     (like %c) and have an 'e' in group1 not affect an 'e' in group2.
  74.     Within the group, each 'e' command will repeat the last destination
  75.     and program if no parameters are used.
  76.    o    ng.c:  note the values returned by the GROUP command in rrn so that
  77.     we can add new articles that came in since our last fetch of the
  78.     active file.  I've upgraded the ngmax[] array to non-debug status,
  79.     and now use it to keep the group's maximum value (like abs1st[]
  80.     does for the minimum).  This allows getngsize() to return a value
  81.     higher than what is contained in the active file copy, and also
  82.     to fetch a new copy of the active file if enough time has elapsed
  83.     since our last fetch.
  84.    o    ng.c:  fixed forcelast to get cleared before processing a command,
  85.     and to get set on '-' just in case it goes to the end of the group.
  86.    o    ng.c:  fixed some indent problems.
  87.    o    ngdata.c:  added the lastactfetch variable (rrn) to keep track of
  88.     when the active file copy was last fetched.
  89.    o    ngdata.c:  getngsize() uses the value in ngmax[] to override the
  90.     high active-file-copy value.  If ngmax[] is bigger and enough time
  91.     has gone by, a new copy of the active file is fetched.
  92.    o    ngdata.c:  more indent tweaks.
  93.    o    ngdata.c:  fixed a1st to be a long (it might have been int or long,
  94.     and sscanf() was expecting an int), and added "last" to sscanf the
  95.     high newsgroup value at the same time abs1st is being set.  Fixed
  96.     a problem with the sscanf being executed if the NNTP command failed.
  97.    o    ngdata.c:  minor tweak to the "notdef" comment to make it accurate.
  98.    o    ngdata.h:  MINFETCHTIME is set for 5 minutes before another active
  99.     fetch is allowed.
  100.    o    rcln.c:  minor optimization to remove tmpp; removed #ifdef DEBUGGING
  101.     around the ngmax[] array; put \n's before the bogus newsgroup
  102.     warnings.
  103.    o    Allow some slack in the "newsgroup was reset" check to allow for the
  104.     interaction of the ngmax[] array setting a high value in .newsrc
  105.     that a cached version of the active file doesn't reflect yet (can
  106.     happen when starting up rn in some rare cases).
  107.    o    rcstuff.c:  broke out the code that parses the newsrc line into the
  108.     function parse_rcline().  This allows the addition of a new function,
  109.     abandon_ng() that restores the startup values for the current group
  110.     from the .oldnewsrc file (bound to the 'A' command at the newsgroup
  111.     level).
  112.    o    rcstuff.c:  made addnewbydefault a global variable so that it could
  113.     be reset by the 'a' command.  Without this, typing 'N' during the
  114.     startup code would render the 'a' command useless, since all the
  115.     groups you might want to add get an immediate 'n'o answer.
  116.    o    rcstuff.c:  the "if (mode == 'i')" check is needed to keep the
  117.     new-newsgroup-finding code sane.
  118.    o    rcstuff.c:  I changed the code to add groups with a space after
  119.     the ":" or "!".  It's not really required, but it avoids having the
  120.     construct "group!187,193" show up in your .newsrc file when cross-
  121.     posted articles are marked as read for unsubscribed groups.
  122.    o    rcstuff.c:  the .newnewsrc-writing code uses the "cantrecreate"
  123.     message from common.h, and the comments and indentation are fixed,
  124.     as well as one extra ferror() check added.
  125.    o    rcstuff.c:  the newsrc-array-growing code now zeros the ngnum array.
  126.    o    respond.c: moved a negation used with strlen() to avoid problems if
  127.     strlen() is declared to be unsigned.
  128.    o    respond.c: changed the behavior of the 'f' command to ask the
  129.     user if it is an unrelated topic.
  130.    o    rn.c:  added the "direction" flag that makes the 'p' and 'P' command
  131.     work in all circumstances.  Without this, if you have a restriction
  132.     enabled and an empty non-matching group in the way, it won't backup
  133.     at all (and might even go forward!).
  134.    o    rn.c:  your change for outputting the prompt later in the game allows
  135.     for the removal of the reprompt_newsgroup label with the moving of
  136.     the dfltcmd initialization also.
  137.    o    rn.c:  when rrn visits the end of the newsgroups prompt, it will
  138.     fetch a new copy of the active file if enough time has elapsed.
  139.    o    rn.c:  changed the "not found" prompt to mention the 'a' command
  140.     (which is much more useful than 'g' alone).  Made 'g's error
  141.     message a little more clear too.
  142.    o    rn.c:  more indentation twiddles.
  143.    o    rn.c:  removed the check for ' ' from the catchup code, because it's
  144.     getting changed into the default command by setdef().
  145.    o    rn.c:  added the 'A' command to abandon the current newsgroup's
  146.     changes back to the startup state (which is contained in .oldnewsrc).
  147.    o    rn.c:  have the 'a' command reset addnewbydefault to 0.
  148.    o    term.c:  renamed ospeed "outspeed" so that it doesn't conflict with
  149.     some weird system's polution of the name space.
  150.    o    term.c:  support for the termios systems added.
  151.    o    term.c:  winch_catcher() needed an int parameter for ANSI systems.
  152.    o    util.c:  reorganized a couple returns to avoid warnings about not
  153.     returning a value in a function.
  154.    o    Configure now knows about DG Avion.
  155.  
  156. Install this patch using Larry Wall's patch program. You MUST install all
  157. three parts or you will not have a functional program.
  158.  
  159. Index: ndir.h.SH
  160. Prereq: 4.4
  161. *** ndir.h.SH    Sat Nov  9 14:42:43 1991
  162. --- ../rn4.4.3/ndir.h.SH    Sat Feb 22 21:53:53 1992
  163. ***************
  164. *** 7,18 ****
  165.    * gets its values from config.sh, which is generally produced by
  166.    * running Configure.
  167.    */
  168. ! /* $Id: ndir.h.SH,v 4.4 1991/09/09 20:23:31 sob Exp sob $
  169.    *
  170.    * $Log: ndir.h.SH,v $
  171. ! # Revision 4.4  1991/09/09  20:23:31  sob
  172. ! # release 4.4
  173. ! #
  174.    *
  175.    * 
  176.    */
  177. --- 7,18 ----
  178.    * gets its values from config.sh, which is generally produced by
  179.    * running Configure.
  180.    */
  181. ! /* $Id: ndir.h.SH,v 4.4 1991/09/09 20:23:31 sob Exp $
  182.    *
  183.    * $Log: ndir.h.SH,v $
  184. !  *Revision 4.4  1991/09/09  20:23:31  sob
  185. !  *release 4.4
  186. !  *
  187.    *
  188.    * 
  189.    */
  190. Index: ng.c
  191. Prereq: 4.4
  192. *** ng.c    Sat Nov  9 14:41:47 1991
  193. --- ../rn4.4.3/ng.c    Sat Feb 22 21:54:29 1992
  194. ***************
  195. *** 1,6 ****
  196. ! /* $Id: ng.c,v 4.4 1991/09/09 20:23:31 sob Exp sob $
  197.    *
  198.    * $Log: ng.c,v $
  199.    * Revision 4.4  1991/09/09  20:23:31  sob
  200.    * release 4.4
  201.    *
  202. --- 1,9 ----
  203. ! /* $Id: ng.c,v 4.4.3.1 1992/02/01 03:09:32 sob PATCH_3 sob $
  204.    *
  205.    * $Log: ng.c,v $
  206. +  * Revision 4.4.3.1  1992/02/01  03:09:32  sob
  207. +  * Release 4.4 Patchlevel 3
  208. +  *
  209.    * Revision 4.4  1991/09/09  20:23:31  sob
  210.    * release 4.4
  211.    *
  212. ***************
  213. *** 135,147 ****
  214. --- 138,167 ----
  215.       recent_art = curr_art = -1;
  216.       exit_code = NG_NORM;
  217.   
  218. +     if (extractdest) {
  219. +     free(extractdest);
  220. +     extractdest = Nullch;
  221. +     }
  222. +     if (extractprog) {
  223. +     free(extractprog);
  224. +     extractprog = Nullch;
  225. +     }
  226.   #ifdef SERVER
  227.       sprintf(ser_line, "GROUP %s", ngname);
  228. + #ifdef DEBUGGING
  229. +     if (debug & DEB_NNTP)
  230. +     printf(">%s\n", ser_line) FLUSH;
  231. + #endif
  232.       put_server(ser_line);
  233.       if (nntp_get(ser_line, sizeof(ser_line)) < 0) {
  234.       fprintf(stderr, "\nrrn: Unexpected close of server socket.\n");
  235.       finalize(1);
  236.       }
  237. + #ifdef DEBUGGING
  238. +     if (debug & DEB_NNTP)
  239. +     printf("<%s\n", ser_line) FLUSH;
  240. + #endif
  241.       if (*ser_line != CHAR_OK) {
  242.       if (atoi(ser_line) != ERR_NOGROUP){
  243.           fprintf(stderr, "\nrrn: server response to GROUP %s:\n%s\n",
  244. ***************
  245. *** 150,155 ****
  246. --- 170,184 ----
  247.       }
  248.       return (-1);
  249.       }
  250. +     {
  251. +     long first, last;
  252. +     (void) sscanf(ser_line,"%*d%*d%ld%ld",&first,&last);
  253. +     ngmax[ng] = last;    /* ensure getngsize() knows the new maximum */
  254. + # ifdef CACHEFIRST
  255. +     abs1st[ng] = first;
  256. + # endif
  257. +     }
  258.   #else /* not SERVER */
  259.       if (eaccess(ngdir,5)) {        /* directory read protected? */
  260.       if (eaccess(ngdir,0)) {
  261. ***************
  262. *** 164,171 ****
  263.   #endif
  264.   #ifdef CATCHUP
  265.           catch_up(ng);
  266. ! #endif
  267.           toread[ng] = TR_NONE;
  268.       }
  269.       else {
  270.   #ifdef VERBOSE
  271. --- 193,201 ----
  272.   #endif
  273.   #ifdef CATCHUP
  274.           catch_up(ng);
  275. ! #else
  276.           toread[ng] = TR_NONE;
  277. + #endif
  278.       }
  279.       else {
  280.   #ifdef VERBOSE
  281. ***************
  282. *** 471,476 ****
  283. --- 501,507 ----
  284.       fflush(stdout);
  285.   reinp_article:
  286.       reread = FALSE;
  287. +     forcelast = FALSE;
  288.       eat_typeahead();
  289.   #ifdef PENDING
  290.       look_ahead();            /* see what we can do in advance */
  291. ***************
  292. *** 524,532 ****
  293.       }
  294.       putchar('\n') FLUSH;
  295.   #ifdef DELAYMARK
  296. !     yankback();                /* do a Y command */
  297.   #endif
  298. !     restore_ng();            /* reconstitute .newsrc line */
  299.       doing_ng = FALSE;            /* tell sig_catcher to cool it */
  300.       free(ctlarea);            /* return the control area */
  301.   #ifdef CACHESUBJ
  302. --- 555,563 ----
  303.       }
  304.       putchar('\n') FLUSH;
  305.   #ifdef DELAYMARK
  306. !     yankback();                /* do a Y command */
  307.   #endif
  308. !     restore_ng();            /* reconstitute .newsrc line */
  309.       doing_ng = FALSE;            /* tell sig_catcher to cool it */
  310.       free(ctlarea);            /* return the control area */
  311.   #ifdef CACHESUBJ
  312. ***************
  313. *** 610,615 ****
  314. --- 641,647 ----
  315.       if (recent_art >= 0) {
  316.           art = recent_art;
  317.           reread = TRUE;
  318. +         forcelast = TRUE;
  319.   #ifdef ARTSEARCH
  320.           srchahead = -(srchahead != 0);
  321.   #endif
  322. ***************
  323. *** 949,954 ****
  324. --- 981,988 ----
  325.   #endif
  326.       if (art <= lastart)
  327.           reread = TRUE;
  328. +     else
  329. +         forcelast = TRUE;
  330.       return AS_NORM;
  331.   #ifdef ROTATION
  332.       case 'X':
  333. ***************
  334. *** 1078,1082 ****
  335.       else
  336.   #endif
  337.           dfltcmd = "npq";
  338. !     }
  339.   }
  340. --- 1112,1116 ----
  341.       else
  342.   #endif
  343.           dfltcmd = "npq";
  344. !     }
  345.   }
  346. Index: ngdata.c
  347. Prereq: 4.4.2.1
  348. *** ngdata.c    Sun Dec  1 12:09:28 1991
  349. --- ../rn4.4.3/ngdata.c    Sat Feb 22 21:54:58 1992
  350. ***************
  351. *** 1,6 ****
  352. ! /* $Id: ngdata.c,v 4.4.2.1 1991/12/01 18:05:42 sob PATCH_2 sob $
  353.    *
  354.    * $Log: ngdata.c,v $
  355.    * Revision 4.4.2.1  1991/12/01  18:05:42  sob
  356.    * Patchlevel 2 changes
  357.    *
  358. --- 1,9 ----
  359. ! /* $Id: ngdata.c,v 4.4.3.1 1992/02/01 03:09:32 sob PATCH_3 sob $
  360.    *
  361.    * $Log: ngdata.c,v $
  362. +  * Revision 4.4.3.1  1992/02/01  03:09:32  sob
  363. +  * Release 4.4 Patchlevel 3
  364. +  *
  365.    * Revision 4.4.2.1  1991/12/01  18:05:42  sob
  366.    * Patchlevel 2 changes
  367.    *
  368. ***************
  369. *** 31,36 ****
  370. --- 34,40 ----
  371.   #include "ndir.h"
  372.   #include "rcstuff.h"
  373.   #include "rn.h"
  374. + #include "ng.h"
  375.   #include "intrp.h"
  376.   #include "final.h"
  377.   #include "rcln.h"
  378. ***************
  379. *** 49,60 ****
  380. --- 53,73 ----
  381.       /* open the active file */
  382.   
  383.   #ifdef SERVER
  384. + #ifdef DEBUGGING
  385. +     if (debug & DEB_NNTP)
  386. +     printf(">LIST\n") FLUSH;
  387. + #endif
  388.       put_server("LIST");        /* tell server we want the active file */
  389.       nntp_get(ser_line, sizeof(ser_line));
  390. + #ifdef DEBUGGING
  391. +     if (debug & DEB_NNTP)
  392. +     printf("<%s\n", ser_line) FLUSH;
  393. + #endif
  394.       if (*ser_line != CHAR_OK) {        /* and then see if that's ok */
  395.       fprintf(stdout, "Can't get active file from server: \n%s\n", ser_line);
  396.       finalize(1);
  397.       }
  398. +     time(&lastactfetch);
  399.   
  400.       cp = filexp("%P/rrnact.%$");    /* make a temporary name */
  401.       strcpy(active_name, cp);
  402. ***************
  403. *** 112,117 ****
  404. --- 125,131 ----
  405.       register char *nam;
  406.       char tmpbuf[80];
  407.       ART_POS oldsoft;
  408. +     long last;
  409.   
  410.       nam = rcline[num];
  411.       len = rcnums[num] - 1;
  412. ***************
  413. *** 140,146 ****
  414.       }
  415.   #endif
  416.       {
  417. !     register char *s, ch;
  418.       ART_NUM tmp;
  419.   
  420.       for (s=tmpbuf+len+1; isdigit(*s); s++) ;
  421. --- 154,160 ----
  422.       }
  423.   #endif
  424.       {
  425. !     register char *s;
  426.       ART_NUM tmp;
  427.   
  428.       for (s=tmpbuf+len+1; isdigit(*s); s++) ;
  429. ***************
  430. *** 155,162 ****
  431.       if (!in_ng) {
  432.           for (s++; isdigit(*s); s++) ;
  433.           while (isspace(*s)) s++;
  434. !         ch = *s;
  435. !         switch (ch) {
  436.           case 'n': moderated = getval("NOPOSTRING"," (no posting)"); break;
  437.           case 'm': moderated = getval("MODSTRING", " (moderated)"); break;
  438.           /* This shouldn't even occur.  What are we doing in a non-existent
  439. --- 169,175 ----
  440.       if (!in_ng) {
  441.           for (s++; isdigit(*s); s++) ;
  442.           while (isspace(*s)) s++;
  443. !         switch (*s) {
  444.           case 'n': moderated = getval("NOPOSTRING"," (no posting)"); break;
  445.           case 'm': moderated = getval("MODSTRING", " (moderated)"); break;
  446.           /* This shouldn't even occur.  What are we doing in a non-existent
  447. ***************
  448. *** 170,176 ****
  449.           }
  450.       }
  451.       }
  452. !     return atol(tmpbuf+len+1);
  453.   }
  454.   
  455.   ACT_POS
  456. --- 183,199 ----
  457.           }
  458.       }
  459.       }
  460. !     last = atol(tmpbuf+len+1);
  461. !     if (last < ngmax[num]) {
  462. ! #ifdef SERVER
  463. !     if (time(Null(time_t*)) - lastactfetch > MINFETCHTIME) {
  464. !         fclose(actfp);
  465. !         ngdata_init();    /* re-grab the active file */
  466. !     }
  467. ! #endif
  468. !     return ngmax[num];
  469. !     }
  470. !     return (ART_NUM)last;
  471.   }
  472.   
  473.   ACT_POS
  474. ***************
  475. *** 204,220 ****
  476.   #ifndef lint
  477.           retval = (ACT_POS) ftell(actfp);
  478.   #endif /* lint */
  479. !         if (ferror(actfp)) {
  480. !             perror("error on active file");
  481. !                  /* something is wrong */
  482. !             sig_catcher(0);
  483. !         }
  484.       }
  485.       if(ferror(actfp)) {
  486.           perror("error on active file");
  487.           sig_catcher(0);
  488.       }
  489. !     return (ACT_POS) -1;        /* well, not so quietly, actually */
  490.       }
  491.       else
  492.   #ifndef lint
  493. --- 227,242 ----
  494.   #ifndef lint
  495.           retval = (ACT_POS) ftell(actfp);
  496.   #endif /* lint */
  497. !         if (ferror(actfp)) {
  498. !         perror("error on active file"); /* something is wrong */
  499. !         sig_catcher(0);
  500. !         }
  501.       }
  502.       if(ferror(actfp)) {
  503.           perror("error on active file");
  504.           sig_catcher(0);
  505.       }
  506. !     return (ACT_POS) -1;
  507.       }
  508.       else
  509.   #ifndef lint
  510. ***************
  511. *** 232,241 ****
  512.   register NG_NUM ngnum;
  513.   ART_NUM ngsize;
  514.   {
  515. !     ART_NUM a1st;
  516.   #ifdef CACHEFIRST
  517.       if (a1st = abs1st[ngnum])
  518. !     return a1st;
  519.   #endif
  520.   #ifdef MININACT
  521.       getngsize(ngnum);
  522. --- 254,264 ----
  523.   register NG_NUM ngnum;
  524.   ART_NUM ngsize;
  525.   {
  526. !     long a1st, last;
  527.   #ifdef CACHEFIRST
  528.       if (a1st = abs1st[ngnum])
  529. !     return (ART_NUM)a1st;
  530.   #endif
  531.   #ifdef MININACT
  532.       getngsize(ngnum);
  533. ***************
  534. *** 245,270 ****
  535.       return abs1st;
  536.   # endif
  537.   #else
  538. -     ART_NUM x,y;
  539.       getngsize(ngnum); /* set moderated as side effect */
  540.       sprintf(ser_line,"GROUP %s",rcline[ngnum]);
  541.       put_server(ser_line);
  542.       if (nntp_get(ser_line, sizeof(ser_line)) < 0) {
  543.       fprintf(stderr, "\nrrn: Unexpected close of server socket.\n");
  544.       finalize(1);
  545.       }
  546.       if (*ser_line == CHAR_FATAL){
  547.       fprintf(stderr,"\nrrn: %s\n",ser_line);
  548.       finalize(1);
  549.       }
  550. !     if (*ser_line != CHAR_OK) {        /* and then see if that's ok */
  551.       a1st = ngsize+1;        /* nothing there */
  552.       }
  553. -     (void) sscanf(ser_line,"%d%d%d",&x,&y,&a1st);
  554.   # ifdef CACHEFIRST
  555. !     abs1st[ngnum] = a1st;
  556.   # endif
  557. !     return a1st;
  558.   #endif
  559.   }
  560.   /* we already know the lowest article number with NNTP */
  561. --- 268,302 ----
  562.       return abs1st;
  563.   # endif
  564.   #else
  565.       getngsize(ngnum); /* set moderated as side effect */
  566.       sprintf(ser_line,"GROUP %s",rcline[ngnum]);
  567. + #ifdef DEBUGGING
  568. +     if (debug & DEB_NNTP)
  569. +     printf(">%s\n", ser_line) FLUSH;
  570. + #endif
  571.       put_server(ser_line);
  572.       if (nntp_get(ser_line, sizeof(ser_line)) < 0) {
  573.       fprintf(stderr, "\nrrn: Unexpected close of server socket.\n");
  574.       finalize(1);
  575.       }
  576. + #ifdef DEBUGGING
  577. +     if (debug & DEB_NNTP)
  578. +     printf("<%s\n", ser_line) FLUSH;
  579. + #endif
  580.       if (*ser_line == CHAR_FATAL){
  581.       fprintf(stderr,"\nrrn: %s\n",ser_line);
  582.       finalize(1);
  583.       }
  584. !     if (*ser_line != CHAR_OK)        /* and then see if that's ok */
  585.       a1st = ngsize+1;        /* nothing there */
  586. +     else {
  587. +     (void) sscanf(ser_line,"%*d%*d%ld%ld",&a1st,&last);
  588. +     ngmax[ngnum] = last;
  589.       }
  590.   # ifdef CACHEFIRST
  591. !     abs1st[ngnum] = (ART_NUM)a1st;
  592.   # endif
  593. !     return (ART_NUM)a1st;
  594.   #endif
  595.   }
  596.   /* we already know the lowest article number with NNTP */
  597. ***************
  598. *** 324,330 ****
  599. --- 356,364 ----
  600.       register ART_NUM min = 1000000;
  601.       register ART_NUM maybe;
  602.       register char *p;
  603. + #ifdef notdef
  604.       char tmpbuf[128];
  605. + #endif
  606.       
  607.       dirp = opendir(dirname);
  608.       if (!dirp)
  609. ***************
  610. *** 336,343 ****
  611.               goto nope;
  612.   #ifdef notdef
  613.          /* 
  614. !         * If newsgroup names have numbers in them as the first
  615. !         * character, then this code will have to be reinserted.
  616.           * For the time being, we assume that if a numeric name is
  617.           * found, it must be an article (and not a directory).
  618.           * This will avoid two stat(2) calls for those running
  619. --- 370,377 ----
  620.               goto nope;
  621.   #ifdef notdef
  622.          /* 
  623. !         * If newsgroup names ever go entirely numeric, then
  624. !         * this code will have to be reinserted.
  625.           * For the time being, we assume that if a numeric name is
  626.           * found, it must be an article (and not a directory).
  627.           * This will avoid two stat(2) calls for those running
  628. Index: ngdata.h
  629. Prereq: 4.4
  630. *** ngdata.h    Sat Nov  9 14:41:30 1991
  631. --- ../rn4.4.3/ngdata.h    Sat Feb 22 21:53:57 1992
  632. ***************
  633. *** 1,6 ****
  634. ! /* $Id: ngdata.h,v 4.4 1991/09/09 20:23:31 sob Exp sob $
  635.    *
  636.    * $Log: ngdata.h,v $
  637.    * Revision 4.4  1991/09/09  20:23:31  sob
  638.    * release 4.4
  639.    *
  640. --- 1,9 ----
  641. ! /* $Id: ngdata.h,v 4.4.3.1 1992/02/01 03:09:32 sob PATCH_3 sob $
  642.    *
  643.    * $Log: ngdata.h,v $
  644. +  * Revision 4.4.3.1  1992/02/01  03:09:32  sob
  645. +  * Release 4.4 Patchlevel 3
  646. +  *
  647.    * Revision 4.4  1991/09/09  20:23:31  sob
  648.    * release 4.4
  649.    *
  650. ***************
  651. *** 26,31 ****
  652. --- 29,36 ----
  653.   
  654.   #ifdef SERVER
  655.       EXT char active_name[MAXFILENAME];
  656. +     EXT time_t lastactfetch INIT(0);
  657. + #define MINFETCHTIME (5 * 60)
  658.   #endif
  659.   
  660.   #ifdef CACHEFIRST
  661. Index: ngsrch.c
  662. Prereq: 4.4
  663. *** ngsrch.c    Sat Nov  9 14:42:38 1991
  664. --- ../rn4.4.3/ngsrch.c    Sat Feb 22 21:55:14 1992
  665. ***************
  666. *** 1,6 ****
  667. ! /* $Id: ngsrch.c,v 4.4 1991/09/09 20:23:31 sob Exp sob $
  668.    *
  669.    * $Log: ngsrch.c,v $
  670.    * Revision 4.4  1991/09/09  20:23:31  sob
  671.    * release 4.4
  672.    *
  673. --- 1,9 ----
  674. ! /* $Id: ngsrch.c,v 4.4.3.1 1992/02/01 03:09:32 sob PATCH_3 sob $
  675.    *
  676.    * $Log: ngsrch.c,v $
  677. +  * Revision 4.4.3.1  1992/02/01  03:09:32  sob
  678. +  * Release 4.4 Patchlevel 3
  679. +  *
  680.    * Revision 4.4  1991/09/09  20:23:31  sob
  681.    * release 4.4
  682.    *
  683. ***************
  684. *** 123,130 ****
  685.   ng_comp(compex,pattern,RE,fold)
  686.   COMPEX *compex;
  687.   char *pattern;
  688. ! bool RE;
  689. ! bool fold;
  690.   {
  691.       char ng_pattern[128];
  692.       register char *s = pattern, *d = ng_pattern;
  693. --- 126,133 ----
  694.   ng_comp(compex,pattern,RE,fold)
  695.   COMPEX *compex;
  696.   char *pattern;
  697. ! bool_int RE;
  698. ! bool_int fold;
  699.   {
  700.       char ng_pattern[128];
  701.       register char *s = pattern, *d = ng_pattern;
  702. Index: ngsrch.h
  703. Prereq: 4.4
  704. *** ngsrch.h    Sat Nov  9 14:41:32 1991
  705. --- ../rn4.4.3/ngsrch.h    Sat Feb 22 21:54:00 1992
  706. ***************
  707. *** 1,6 ****
  708. ! /* $Id: ngsrch.h,v 4.4 1991/09/09 20:23:31 sob Exp sob $
  709.    *
  710.    * $Log: ngsrch.h,v $
  711.    * Revision 4.4  1991/09/09  20:23:31  sob
  712.    * release 4.4
  713.    *
  714. --- 1,9 ----
  715. ! /* $Id: ngsrch.h,v 4.4.3.1 1992/02/01 03:09:32 sob PATCH_3 sob $
  716.    *
  717.    * $Log: ngsrch.h,v $
  718. +  * Revision 4.4.3.1  1992/02/01  03:09:32  sob
  719. +  * Release 4.4 Patchlevel 3
  720. +  *
  721.    * Revision 4.4  1991/09/09  20:23:31  sob
  722.    * release 4.4
  723.    *
  724. ***************
  725. *** 36,40 ****
  726.       bool    ng_wanted ANSI((void));
  727.   #endif
  728.   #ifdef NGSORONLY
  729. !     char    *ng_comp ANSI((COMPEX *,char *,bool,bool));
  730.   #endif
  731. --- 39,43 ----
  732.       bool    ng_wanted ANSI((void));
  733.   #endif
  734.   #ifdef NGSORONLY
  735. !     char    *ng_comp ANSI((COMPEX *,char *,bool_int,bool_int));
  736.   #endif
  737. Index: Configure
  738. Prereq: 4.4.2.1
  739. *** Configure    Sun Dec  1 12:10:51 1991
  740. --- ../rn4.4.3/Configure    Sat Feb 22 21:54:17 1992
  741. ***************
  742. *** 15,23 ****
  743.   # If these # comments don't work, trim them.  Don't worry about the other
  744.   # shell scripts, Configure will trim # comments from them for you.
  745.   #
  746. ! # $Id: Configure,v 4.4.2.1 1991/12/01 18:05:42 sob PATCH_2 sob $
  747.   #
  748.   # $Log: Configure,v $
  749.   # Revision 4.4.2.1  1991/12/01  18:05:42  sob
  750.   # Patchlevel 2 changes
  751.   #
  752. --- 15,26 ----
  753.   # If these # comments don't work, trim them.  Don't worry about the other
  754.   # shell scripts, Configure will trim # comments from them for you.
  755.   #
  756. ! # $Id: Configure,v 4.4.3.1 1992/02/01 03:09:32 sob PATCH_3 sob $
  757.   #
  758.   # $Log: Configure,v $
  759. + # Revision 4.4.3.1  1992/02/01  03:09:32  sob
  760. + # Release 4.4 Patchlevel 3
  761. + #
  762.   # Revision 4.4.2.1  1991/12/01  18:05:42  sob
  763.   # Patchlevel 2 changes
  764.   #
  765. ***************
  766. *** 99,104 ****
  767. --- 102,108 ----
  768.   spool=''
  769.   active=''
  770.   myactive=''
  771. + activetimes=''
  772.   mininact=''
  773.   pref=''
  774.   defeditor=''
  775. ***************
  776. *** 125,130 ****
  777. --- 129,135 ----
  778.   usgnam=''
  779.   whoami=''
  780.   termio=''
  781. + termios=''
  782.   fcntl=''
  783.   ioctl=''
  784.   ptem=''
  785. ***************
  786. *** 145,150 ****
  787. --- 150,156 ----
  788.   isrrn=''
  789.   rdchk=''
  790.   serverfile=''
  791. + ignoreorg=''
  792.   NNTPSRC=''
  793.   CONFIG=''
  794.   
  795. ***************
  796. *** 584,589 ****
  797. --- 590,612 ----
  798.       rrninclude="-DUSG"
  799.       socketlib=
  800.   fi
  801. + : check for DGUX
  802. + cat <<'EOT' >DGUX.c
  803. + #ifdef DGUX
  804. + exit 0
  805. + #else
  806. + exit 1
  807. + #endif
  808. + EOT
  809. + $cpp DGUX.c | grep exit >DGUX
  810. + chmod +x DGUX
  811. + $eunicefix DGUX
  812. + rm DGUX.c
  813. + if DGUX; then
  814. +     echo "This appears to be a DG AViiON..."
  815. + fi
  816.   : check for sgi
  817.   cat <<'EOT' >sgi.c
  818.   #ifdef sgi
  819. ***************
  820. *** 1131,1136 ****
  821. --- 1154,1183 ----
  822.       esac
  823.   done
  824.   
  825. + : Decide whether to ignore the ORGANIZATION environment variable
  826. + cat <<'EOM'
  827. + Rn normally looks in the environment variables NEWSORG and ORGANIZATION
  828. + for an overriding organization name.  However, if your operating system
  829. + reserves the environment variable ORGANIZATION for non-News purposes,
  830. + you will want to ignore it and only have rn check for NEWSORG.
  831. + EOM
  832. + case "$ignoreorg" in
  833. + define) dflt=y ;;
  834. + *)      dflt=n ;;
  835. + esac
  836. + $echo $n "Should we ignore ORGANIZATION? [$dflt] $c"
  837. + . myread
  838. + case "$ans" in
  839. + '') ans="$dflt";;
  840. + esac
  841. + case "$ans" in
  842. + y*) ignoreorg=define ;;
  843. + *)  ignoreorg=undef ;;
  844. + esac
  845.   : get news administrator name
  846.   case "$newsadmin" in
  847.   '')
  848. ***************
  849. *** 1605,1626 ****
  850.       whoami=undef
  851.   fi
  852.   
  853. ! : see if this is a termio system
  854. ! ultrix ; ultrix=$?
  855. ! sun ; sun=$?
  856. ! pyr ; pyr=$?
  857. ! if $test -r /usr/include/termio.h -a $ultrix -ne 0 -a $sun -ne 0 -a $pyr -ne 0; then
  858. !       termio=define
  859. !       $echo "termio.h found."
  860. !   else
  861. !     if $test -r /usr/include/sgtty.h ; then
  862. !     termio=undef
  863. !     $echo "sgtty.h found."
  864. !     else
  865. !     termio=undef
  866. !     $echo "Neither termio.h nor sgtty.h found--you could have problems."
  867. !     fi
  868.   fi
  869.   
  870.   : see if this system has fcntl
  871.   if $test -r /usr/include/fcntl.h ; then
  872. --- 1652,1685 ----
  873.       whoami=undef
  874.   fi
  875.   
  876. ! : see if this is a termio/termios/sgtty system
  877. ! if ultrix || sun || pyr ; then
  878. !     termio=undef
  879. !     termios=undef
  880. !     $echo "Using sgtty.h"
  881. ! else
  882. ! if $test -r /usr/include/termio.h ; then
  883. !     termio=define
  884. !     termios=undef
  885. !     $echo "termio.h found."
  886. ! else
  887. ! if test -d /usr/convex ; then
  888. !     termio=undef
  889. !     termios=define
  890. !     $echo "termios.h found."
  891. ! else
  892. ! if $test -r /usr/include/sgtty.h ; then
  893. !     termio=undef
  894. !     termios=undef
  895. !     $echo "sgtty.h found."
  896. ! else
  897. !     termio=undef
  898. !     termios=undef
  899. !     $echo "Neither termio.h nor sgtty.h found--you could have problems."
  900. ! fi
  901. ! fi
  902.   fi
  903. + fi
  904.   
  905.   : see if this system has fcntl
  906.   if $test -r /usr/include/fcntl.h ; then
  907. ***************
  908. *** 1667,1672 ****
  909. --- 1726,1736 ----
  910.       getcwd=undef
  911.       getwd=define
  912.   else
  913. + if DGUX; then
  914. +     $echo "I know DG/UX has getwd()."
  915. +     getcwd=undef
  916. +     getwd=define
  917. + else
  918.   : see if the system has getcwd
  919.   if $contains '^getcwd$' libc.list >/dev/null 2>&1 ; then
  920.       $echo "getcwd() found."
  921. ***************
  922. *** 1677,1682 ****
  923. --- 1741,1747 ----
  924.       getwd=undef
  925.   fi
  926.   fi
  927. + fi
  928.   
  929.   : see if there is a vfork
  930.   if $contains '^vfork$' libc.list >/dev/null 2>&1 ; then
  931. ***************
  932. *** 2083,2089 ****
  933.   *)  dflt="$active";;
  934.   esac
  935.   case "$isrrn" in
  936. ! define) myactive=.falseactive;;
  937.   *) myactive='blurfl/dyick'
  938.   esac
  939.   while $test ! -f "$myactive"; do
  940. --- 2148,2176 ----
  941.   *)  dflt="$active";;
  942.   esac
  943.   case "$isrrn" in
  944. ! define) myactive=.falseactive
  945. !     : check for active.times
  946. !     case "$activetimes" in
  947. !     ''|none|nntp) dflt="n";;
  948. !     *)          dflt="y";;
  949. !     esac
  950. !     cat <<'EOM'
  951. ! If your server maintains an accurate "active.times" file (as C news does), rn
  952. ! can make use of the much better NEWGROUPS call in NNTP to find new groups. 
  953. ! Otherwise, the old method will suffice.
  954. ! EOM
  955. !     $echo $n "Will your server support a reliable NEWGROUPS call? [$dflt] $c"
  956. !     . myread
  957. !     case "$ans" in
  958. !     '') ans="$dflt";;
  959. !     esac
  960. !     case "$ans" in
  961. !     y*) activetimes="nntp";;
  962. !     *)  activetimes='none';;
  963. !     esac
  964. !     ;;
  965.   *) myactive='blurfl/dyick'
  966.   esac
  967.   while $test ! -f "$myactive"; do
  968. ***************
  969. *** 2114,2119 ****
  970. --- 2201,2236 ----
  971.       myactive=$myactive/active
  972.       active=$active/active
  973.       fi
  974. +     : check for active.times
  975. +     case "$activetimes" in
  976. +     ''|nntp) dflt="${active}.times";;
  977. +     *)       dflt="$activetimes";;
  978. +     esac
  979. +     if $test "$dflt " = "none " -o ! -f $dflt ; then
  980. +     $cat <<'EOM'
  981. + If rn can use a file called active.times it can greatly speed up the
  982. + newgroup-checking code.  If you have access to a file maintained by C news,
  983. + use that.  Or you can install acttimes to maintain an active.times file
  984. + for you.  Otherwise, specify "none" for the good ol' slow approach.
  985. + EOM
  986. +     else
  987. +     $cat <<EOM
  988. + -- Found $dflt --
  989. + If this file is being maintained by C news, mthreads -t, or some other means,
  990. + you'll probably want to use it to greatly speed up the newgroup code.  If not
  991. + use "none" to indicate the good ol' slow approach.
  992. + EOM
  993. +     fi
  994. +     $echo $n "Active.times file to use or 'none'? [$dflt] $c"
  995. +     . myread
  996. +     case "$ans" in
  997. +     '') ans="$dflt";;
  998. +     esac
  999. +     activetimes="$ans"
  1000.   done
  1001.   
  1002.   : check for 2.10.2 and above
  1003. ***************
  1004. *** 2616,2621 ****
  1005. --- 2733,2739 ----
  1006.   spool='$spool'
  1007.   active='$active'
  1008.   myactive='$myactive'
  1009. + activetimes='$activetimes'
  1010.   mininact='$mininact'
  1011.   pref='$pref'
  1012.   defeditor='$defeditor'
  1013. ***************
  1014. *** 2660,2665 ****
  1015. --- 2778,2784 ----
  1016.   rdchk='$rdchk'
  1017.   isrrn='$isrrn'
  1018.   serverfile='$serverfile'
  1019. + ignoreorg='$ignoreorg'
  1020.   NNTPSRC='$NNTPSRC'
  1021.   CONFIG=true
  1022.   EOT
  1023. Index: Makefile.SH
  1024. Prereq: 4.4.2.1
  1025. *** Makefile.SH    Sun Dec  1 12:06:24 1991
  1026. --- ../rn4.4.3/Makefile.SH    Sat Feb 22 21:55:08 1992
  1027. ***************
  1028. *** 3,9 ****
  1029.   esac
  1030.   echo "Extracting Makefile (with variable substitutions)"
  1031.   $cat >Makefile <<!GROK!THIS!
  1032. ! # $Id: Makefile.SH,v 4.4.2.1 1991/12/01 18:05:42 sob PATCH_2 sob $
  1033.   #
  1034.   # This software is Copyright 1991 by Stan Barber. 
  1035.   #
  1036. --- 3,9 ----
  1037.   esac
  1038.   echo "Extracting Makefile (with variable substitutions)"
  1039.   $cat >Makefile <<!GROK!THIS!
  1040. ! # $Id: Makefile.SH,v 4.4.3.1 1992/02/01 03:09:32 sob PATCH_3 sob $
  1041.   #
  1042.   # This software is Copyright 1991 by Stan Barber. 
  1043.   #
  1044. ***************
  1045. *** 18,23 ****
  1046. --- 18,26 ----
  1047.   # is at the user's own risk. 
  1048.   #
  1049.   # $Log: Makefile.SH,v $
  1050. + # Revision 4.4.3.1  1992/02/01  03:09:32  sob
  1051. + # Release 4.4 Patchlevel 3
  1052. + #
  1053.   # Revision 4.4.2.1  1991/12/01  18:05:42  sob
  1054.   # Changed clientlib to be built in the rn tree instead of the nntp tree.
  1055.   #
  1056. ***************
  1057. *** 82,88 ****
  1058.   add2 = bsd config.h config.sh eunice filexp 
  1059.   add3 = loc makedepend makedir mbox.saver ndir.h newsetup
  1060.   add4 = newsgroups newsnews norm.saver
  1061. ! add5 = pdp11 usg v7 ultrix sun hp-ux sgi xenix next server.h mips uts
  1062.   add6 = all pyr grimble .falseactive Pnews.header s5uniq sigtest stardent
  1063.   
  1064.   addedbyconf = $(add1) $(add2) $(add3) $(add4) $(add5) $(add6)
  1065. --- 85,91 ----
  1066.   add2 = bsd config.h config.sh eunice filexp 
  1067.   add3 = loc makedepend makedir mbox.saver ndir.h newsetup
  1068.   add4 = newsgroups newsnews norm.saver
  1069. ! add5 = pdp11 usg v7 ultrix sun hp-ux sgi xenix next server.h mips uts DGUX
  1070.   add6 = all pyr grimble .falseactive Pnews.header s5uniq sigtest stardent
  1071.   
  1072.   addedbyconf = $(add1) $(add2) $(add3) $(add4) $(add5) $(add6)
  1073. ***************
  1074. *** 119,124 ****
  1075. --- 122,128 ----
  1076.       - if test `pwd` != $(rnbin); then cp $(public) $(rnbin); fi
  1077.       - if test `pwd` != $(rnbin); then cd $(rnbin); chmod 755 $(public); strip rn ; fi
  1078.       - ./makedir `./filexp $(rnlib)`
  1079. +     - chmod 755 `./filexp $(rnlib)`
  1080.       - if test `pwd` != `./filexp $(rnlib)`; then cp INIT $(private) `./filexp $(rnlib)`; fi
  1081.   #NNTP    - if test `pwd` != `./filexp $(rnlib)`; then strip `./filexp $(rnlib)`/getactive ; fi
  1082.       - if test ! -f `./filexp $(rnlib)/newsnews`; then cp newsnews `./filexp $(rnlib)`; fi
  1083. ***************
  1084. *** 126,131 ****
  1085. --- 130,136 ----
  1086.       - if test `pwd` != $(mansrc); then \
  1087.   for page in $(manpages); do \
  1088.   cp $$page $(mansrc)/`basename $$page .1`.$(manext); \
  1089. + chmod 444 $(mansrc)/`basename $$page .1`.$(manext); \
  1090.   done; \
  1091.   #NNTPecho ".so man$(manext)/rn.$(manext)" > $(mansrc)/rrn.$(manext) ; \
  1092.   fi
  1093. Index: NEW
  1094. *** ../NEW    Sun Dec  1 12:13:55 1991
  1095. --- ../../rn4.4.3/NEW    Sat Feb 22 21:54:52 1992
  1096. ***************
  1097. *** 1,3 ****
  1098. --- 1,152 ----
  1099. +             NEW FEATURES OF RN 4.4.3
  1100. +    o    Configure changes:  check for active.times (see new-group comments
  1101. +     below), termios systems (see termios comments later on), and also
  1102. +     ask if ORGANIZATION should be ignored.  This latter change allows
  1103. +     systems that use the ORGANIZATION variable for their own purposes
  1104. +     a chance to only use NEWSORG, thus allowing them to take advantage
  1105. +     of the default if NEWSORG is undefined (without this, everyone who
  1106. +     uses rn would _have_ to define NEWSORG to avoid the ORGANIZATION
  1107. +     define).
  1108. +    o    Pnews.SH: support ignoring of ORGANIZATION; echo --> $echo;
  1109. +     cat --> $cat.
  1110. +    o    Rnmail.SH: support ignoring of ORGANIZATION.
  1111. +    o    Many files: I've change the parameters of any function trying to
  1112. +     pass a character (including bool) into a type_int (e.g. char_int).
  1113. +     This avoids errors for ANSI compilers that don't believe that the
  1114. +     promoted argument type is valid (they try to pass a char as a char,
  1115. +     without promoting it to an int, and complain about the old syntax).
  1116. +    o    addng.c:  the new new-group-finding code is in here.  Optimized the
  1117. +     writing/reading of newsgroup lists by using "w+" and rewinding the
  1118. +     file.  If ACTIVE_TIMES is defined, the new function find_new_groups()
  1119. +     uses the NEWGROUPS command (in NNTP) or the ACTIVE_TIMES file (in
  1120. +     regular rn) to determine new groups.  If it's not defined, then the
  1121. +     find_new_groups() function does the old method (using the code moved
  1122. +     here from init.c).
  1123. +    o    added the DEB_NNTP define to output some useful NNTP debugging info
  1124. +     without having all information scroll by like it does with the NNTP
  1125. +     clientlib's debugging turned on.
  1126. +    o    I optimized a few of the sscanf's to use "%*d" to skip numbers
  1127. +     that were being ignored, and removed the useless variables.
  1128. +    o    art.c:  enhanced the Newsgroups-magic code to show the Newsgroups
  1129. +     line if it doesn't match the current group.  I find this really
  1130. +     useful for browsing through junk or seeing which articles have
  1131. +     been redirected with C new's '=' directive.
  1132. +    o    autosub.c:  reordered the include files to avoid a problem with
  1133. +     ANSI compilers.
  1134. +    o    bits.c:  fixed a bug in the instr() call in the !NORELAY section
  1135. +     (the ", TRUE" was in the wrong place).
  1136. +    o    common.h, etc:  if TERMIOS is defined, include termios.h and use
  1137. +     some slightly different term functions.  Configure was smart enough
  1138. +     to NOT set this for suns, and a few other systems that don't like it.
  1139. +    o    common.h:  if __STDC__ is defined, turn on the ANSI() prototypes
  1140. +     automatically.
  1141. +    o    common.h:  nullstr[] = ""; actually generates a warning(!) on some
  1142. +     weird compilers -- changed to nullstr[1] = "";.
  1143. +    o    common.h:  "Can't recreate..." message is used in the .newnewsrc
  1144. +     writing code.
  1145. +    o    config.h.SH:  conditionalize the including of the config.sh file
  1146. +     like the other .SH files do.  Also added the new Configure stuff.
  1147. +    o    config.h.SH needs to have its RCS comment character changed to "# ".
  1148. +    o    config.h.SH:  all the changes in the tail end are tab/space changes
  1149. +     that force the code to look pretty in config.h no matter if it is
  1150. +     preceded by a "#define" or a "/*#undef".
  1151. +    o    final.c:  int_catcher() needs an int parameter to agree with ANSI
  1152. +     compilers.  sig_catcher() had an assumed int parameter warning.
  1153. +    o    init.c:  more new-group changes (i.e. it calls find_new_groups(),
  1154. +     and the old new-group code was moved to addng.c).
  1155. +    o    intrp.c:  changes to support ignoring ORGANIZATION.  A slight tweak
  1156. +     allows the organization file not not end in a newline.
  1157. +    o    intrp.c:  moved the tmpbuf[] into the #ifdefs where it is used (to
  1158. +     avoid an "unused" warning.  In the process, discovered a bug in the
  1159. +     non-BSD code that tries to copy an uninitialized (now undefined) tmpbuf
  1160. +     into buf (when it should be copying 's').
  1161. +    o    last.c:  extended the contents of .rnlast to support the new-group
  1162. +     code.  Handles reading the old .rnlast style gracefully.
  1163. +    o    ng.c:  reset the value of extractdest and extractprog when entering
  1164. +     a newsgroup.  This allows someone to set SAVEDIR to a roving value
  1165. +     (like %c) and have an 'e' in group1 not affect an 'e' in group2.
  1166. +     Within the group, each 'e' command will repeat the last destination
  1167. +     and program if no parameters are used.
  1168. +    o    ng.c:  note the values returned by the GROUP command in rrn so that
  1169. +     we can add new articles that came in since our last fetch of the
  1170. +     active file.  I've upgraded the ngmax[] array to non-debug status,
  1171. +     and now use it to keep the group's maximum value (like abs1st[]
  1172. +     does for the minimum).  This allows getngsize() to return a value
  1173. +     higher than what is contained in the active file copy, and also
  1174. +     to fetch a new copy of the active file if enough time has elapsed
  1175. +     since our last fetch.
  1176. +    o    ng.c:  fixed forcelast to get cleared before processing a command,
  1177. +     and to get set on '-' just in case it goes to the end of the group.
  1178. +    o    ng.c:  fixed some indent problems.
  1179. +    o    ngdata.c:  added the lastactfetch variable (rrn) to keep track of
  1180. +     when the active file copy was last fetched.
  1181. +    o    ngdata.c:  getngsize() uses the value in ngmax[] to override the
  1182. +     high active-file-copy value.  If ngmax[] is bigger and enough time
  1183. +     has gone by, a new copy of the active file is fetched.
  1184. +    o    ngdata.c:  more indent tweaks.
  1185. +    o    ngdata.c:  fixed a1st to be a long (it might have been int or long,
  1186. +     and sscanf() was expecting an int), and added "last" to sscanf the
  1187. +     high newsgroup value at the same time abs1st is being set.  Fixed
  1188. +     a problem with the sscanf being executed if the NNTP command failed.
  1189. +    o    ngdata.c:  minor tweak to the "notdef" comment to make it accurate.
  1190. +    o    ngdata.h:  MINFETCHTIME is set for 5 minutes before another active
  1191. +     fetch is allowed.
  1192. +    o    rcln.c:  minor optimization to remove tmpp; removed #ifdef DEBUGGING
  1193. +     around the ngmax[] array; put \n's before the bogus newsgroup
  1194. +     warnings.
  1195. +    o    Allow some slack in the "newsgroup was reset" check to allow for the
  1196. +     interaction of the ngmax[] array setting a high value in .newsrc
  1197. +     that a cached version of the active file doesn't reflect yet (can
  1198. +     happen when starting up rn in some rare cases).
  1199. +    o    rcstuff.c:  broke out the code that parses the newsrc line into the
  1200. +     function parse_rcline().  This allows the addition of a new function,
  1201. +     abandon_ng() that restores the startup values for the current group
  1202. +     from the .oldnewsrc file (bound to the 'A' command at the newsgroup
  1203. +     level).
  1204. +    o    rcstuff.c:  made addnewbydefault a global variable so that it could
  1205. +     be reset by the 'a' command.  Without this, typing 'N' during the
  1206. +     startup code would render the 'a' command useless, since all the
  1207. +     groups you might want to add get an immediate 'n'o answer.
  1208. +    o    rcstuff.c:  the "if (mode == 'i')" check is needed to keep the
  1209. +     new-newsgroup-finding code sane.
  1210. +    o    rcstuff.c:  I changed the code to add groups with a space after
  1211. +     the ":" or "!".  It's not really required, but it avoids having the
  1212. +     construct "group!187,193" show up in your .newsrc file when cross-
  1213. +     posted articles are marked as read for unsubscribed groups.
  1214. +    o    rcstuff.c:  the .newnewsrc-writing code uses the "cantrecreate"
  1215. +     message from common.h, and the comments and indentation are fixed,
  1216. +     as well as one extra ferror() check added.
  1217. +    o    rcstuff.c:  the newsrc-array-growing code now zeros the ngnum array.
  1218. +    o    respond.c: moved a negation used with strlen() to avoid problems if
  1219. +     strlen() is declared to be unsigned.
  1220. +    o    respond.c: changed the behavior of the 'f' command to ask the
  1221. +     user if it is an unrelated topic.
  1222. +    o    rn.c:  added the "direction" flag that makes the 'p' and 'P' command
  1223. +     work in all circumstances.  Without this, if you have a restriction
  1224. +     enabled and an empty non-matching group in the way, it won't backup
  1225. +     at all (and might even go forward!).
  1226. +    o    rn.c:  your change for outputting the prompt later in the game allows
  1227. +     for the removal of the reprompt_newsgroup label with the moving of
  1228. +     the dfltcmd initialization also.
  1229. +    o    rn.c:  when rrn visits the end of the newsgroups prompt, it will
  1230. +     fetch a new copy of the active file if enough time has elapsed.
  1231. +    o    rn.c:  changed the "not found" prompt to mention the 'a' command
  1232. +     (which is much more useful than 'g' alone).  Made 'g's error
  1233. +     message a little more clear too.
  1234. +    o    rn.c:  more indentation twiddles.
  1235. +    o    rn.c:  removed the check for ' ' from the catchup code, because it's
  1236. +     getting changed into the default command by setdef().
  1237. +    o    rn.c:  added the 'A' command to abandon the current newsgroup's
  1238. +     changes back to the startup state (which is contained in .oldnewsrc).
  1239. +    o    rn.c:  have the 'a' command reset addnewbydefault to 0.
  1240. +    o    term.c:  renamed ospeed "outspeed" so that it doesn't conflict with
  1241. +     some weird system's polution of the name space.
  1242. +    o    term.c:  support for the termios systems added.
  1243. +    o    term.c:  winch_catcher() needed an int parameter for ANSI systems.
  1244. +    o    util.c:  reorganized a couple returns to avoid warnings about not
  1245. +     returning a value in a function.
  1246. +    o    Configure now knows about DG Avion.
  1247.               NEW FEATURES OF RN 4.4.2 vs RN 4.4
  1248.   New % interpolation
  1249.       %E        the last directory to which extracted files were
  1250. Index: Pnews.SH
  1251. Prereq: 4.4.2.1
  1252. *** Pnews.SH    Sun Dec  1 12:07:40 1991
  1253. --- ../rn4.4.3/Pnews.SH    Sat Feb 22 21:54:45 1992
  1254. ***************
  1255. *** 4,12 ****
  1256.   echo "Extracting Pnews (with variable substitutions)"
  1257.   $spitshell >Pnews <<!GROK!THIS!
  1258.   $startsh
  1259. ! # $Id: Pnews.SH,v 4.4.2.1 1991/12/01 18:05:42 sob PATCH_2 sob $
  1260.   #
  1261.   # $Log: Pnews.SH,v $
  1262.   # Revision 4.4.2.1  1991/12/01  18:05:42  sob
  1263.   # Patchlevel 2
  1264.   #
  1265. --- 4,15 ----
  1266.   echo "Extracting Pnews (with variable substitutions)"
  1267.   $spitshell >Pnews <<!GROK!THIS!
  1268.   $startsh
  1269. ! # $Id: Pnews.SH,v 4.4.3.1 1992/02/01 03:09:32 sob PATCH_3 sob $
  1270.   #
  1271.   # $Log: Pnews.SH,v $
  1272. + # Revision 4.4.3.1  1992/02/01  03:09:32  sob
  1273. + # Release 4.4 Patchlevel 3
  1274. + #
  1275.   # Revision 4.4.2.1  1991/12/01  18:05:42  sob
  1276.   # Patchlevel 2
  1277.   #
  1278. ***************
  1279. *** 86,91 ****
  1280. --- 89,95 ----
  1281.   # use them all set the unused ones to a non-null string such as 'none'.
  1282.   loc="$locpref"
  1283.   org="$orgpref"
  1284. + multistate="$multistatepref"
  1285.   city="$citypref"
  1286.   state="$statepref"
  1287.   cntry="$cntrypref"
  1288. ***************
  1289. *** 104,109 ****
  1290. --- 108,123 ----
  1291.   ypmatch=${ypmatch}
  1292.   
  1293.   !GROK!THIS!
  1294. + case "$ignoreorg" in
  1295. + define) $spitshell >>Pnews <<'!NO!SUBS!'
  1296. + orgname=${NEWSORG-$orgname}
  1297. + !NO!SUBS!
  1298. +     ;;
  1299. + *)    $spitshell >>Pnews <<'!NO!SUBS!'
  1300. + orgname=${NEWSORG-${ORGANIZATION-$orgname}}
  1301. + !NO!SUBS!
  1302. +     ;;
  1303. + esac
  1304.   $spitshell >>Pnews <<'!NO!SUBS!'
  1305.   dotdir=${DOTDIR-${HOME-$LOGDIR}}
  1306.   tmpart=$dotdir/.article
  1307. ***************
  1308. *** 128,135 ****
  1309.   fi
  1310.   
  1311.   case $cntry in
  1312. !   can) stpr=Province ;;
  1313. !   *)   stpr=State ;;
  1314.   esac
  1315.   
  1316.   headerfile=""
  1317. --- 142,154 ----
  1318.   fi
  1319.   
  1320.   case $cntry in
  1321. !   can) Stpr=Province ; stpr=province ;;
  1322. !   *)   Stpr=State ; stpr=state ;;
  1323. ! esac
  1324. ! case $multistate in
  1325. !   pnw) multistpr="Pacific NorthWest" ;;
  1326. !   *)   multistpr="Multi-State Area" ;;
  1327.   esac
  1328.   
  1329.   headerfile=""
  1330. ***************
  1331. *** 258,265 ****
  1332.   $cntry.*)
  1333.       $echo 'This program posts news to many machines throughout the country.'
  1334.       ;;
  1335.   $state.*)
  1336. !     $echo 'This program posts news to many machines throughout the state.'
  1337.       ;;
  1338.   $city.*)
  1339.       $echo 'This program posts news to many machines throughout the city.'
  1340. --- 277,287 ----
  1341.   $cntry.*)
  1342.       $echo 'This program posts news to many machines throughout the country.'
  1343.       ;;
  1344. + $multistate.*)
  1345. +     $echo "This program posts news to many machines throughout the ${multistpr}."
  1346. +     ;;
  1347.   $state.*)
  1348. !     $echo "This program posts news to many machines throughout the ${stpr}."
  1349.       ;;
  1350.   $city.*)
  1351.       $echo 'This program posts news to many machines throughout the city.'
  1352. ***************
  1353. *** 442,453 ****
  1354.               n*) ;;
  1355.               *)
  1356.                   if $test -f $dotdir/.signature; then
  1357. !                 echo $n "Append .signature file? [y] $c"
  1358.                   read ans
  1359.                   case $ans in
  1360.                   ''|y*)
  1361. !                     echo "-- " >> $tmpart
  1362. !                     cat $dotdir/.signature >> $tmpart
  1363.                       ;;
  1364.                   esac
  1365.                   fi
  1366. --- 464,475 ----
  1367.               n*) ;;
  1368.               *)
  1369.                   if $test -f $dotdir/.signature; then
  1370. !                 $echo $n "Append .signature file? [y] $c"
  1371.                   read ans
  1372.                   case $ans in
  1373.                   ''|y*)
  1374. !                     $echo "-- " >> $tmpart
  1375. !                     $cat $dotdir/.signature >> $tmpart
  1376.                       ;;
  1377.                   esac
  1378.                   fi
  1379. ***************
  1380. *** 596,602 ****
  1381.       Local organization:    $loc
  1382.       Organization:    $org
  1383.       City:        $city
  1384. !     $stpr:          $state
  1385.       Country:        $cntry
  1386.       Continent:        $cont
  1387.       Everywhere:        world
  1388. --- 618,625 ----
  1389.       Local organization:    $loc
  1390.       Organization:    $org
  1391.       City:        $city
  1392. !     $Stpr:          $state
  1393. !     $multistpr:    $multistate
  1394.       Country:        $cntry
  1395.       Continent:        $cont
  1396.       Everywhere:        world
  1397. ***************
  1398. *** 620,626 ****
  1399.   The actual area designators to use depend on where you are, of course.
  1400.   EOH
  1401.       ;;
  1402. !     ''|$loc*|$org*|$city*|$state*|$cntry*|$cont*|$defdist)
  1403.       ;;
  1404.       world*|comp*|news*|sci*|rec*|misc*|soc*|talk*|alt*)
  1405.       dist=''
  1406. --- 643,649 ----
  1407.   The actual area designators to use depend on where you are, of course.
  1408.   EOH
  1409.       ;;
  1410. !     ''|$loc*|$org*|$city*|$state*|$multistate*|$cntry*|$cont*|$defdist)
  1411.       ;;
  1412.       world*|comp*|news*|sci*|rec*|misc*|soc*|talk*|alt*)
  1413.       dist=''
  1414. ***************
  1415. *** 727,733 ****
  1416.       ;;
  1417.   esac
  1418.   
  1419. - orgname=${NEWSORG-${ORGANIZATION-$orgname}}
  1420.   case $orgname in
  1421.   /*) orgname=`$cat $orgname` ;;
  1422.   esac
  1423. --- 750,755 ----
  1424. Index: Rnmail.SH
  1425. Prereq: 4.4
  1426. *** Rnmail.SH    Sat Nov  9 15:25:15 1991
  1427. --- ../rn4.4.3/Rnmail.SH    Sat Feb 22 21:55:02 1992
  1428. ***************
  1429. *** 4,12 ****
  1430.   echo "Extracting Rnmail (with variable substitutions)"
  1431.   $spitshell >Rnmail <<!GROK!THIS!
  1432.   $startsh
  1433. ! # $Id: Rnmail.SH,v 4.4 1991/09/09 20:18:23 sob Exp sob $
  1434.   # 
  1435.   # $Log: Rnmail.SH,v $
  1436.   # Revision 4.4  1991/09/09  20:18:23  sob
  1437.   # release 4.4
  1438.   #
  1439. --- 4,15 ----
  1440.   echo "Extracting Rnmail (with variable substitutions)"
  1441.   $spitshell >Rnmail <<!GROK!THIS!
  1442.   $startsh
  1443. ! # $Id: Rnmail.SH,v 4.4.3.1 1992/02/01 03:09:32 sob PATCH_3 sob $
  1444.   # 
  1445.   # $Log: Rnmail.SH,v $
  1446. + # Revision 4.4.3.1  1992/02/01  03:09:32  sob
  1447. + # Release 4.4 Patchlevel 3
  1448. + #
  1449.   # Revision 4.4  1991/09/09  20:18:23  sob
  1450.   # release 4.4
  1451.   #
  1452. ***************
  1453. *** 76,81 ****
  1454. --- 79,94 ----
  1455.   rm=${rm-rm}
  1456.   
  1457.   !GROK!THIS!
  1458. + case "$ignoreorg" in
  1459. + define) $spitshell >>Rnmail <<'!NO!SUBS!'
  1460. + orgname=${NEWSORG-$orgname}
  1461. + !NO!SUBS!
  1462. +     ;;
  1463. + *)    $spitshell >>Rnmail <<'!NO!SUBS!'
  1464. + orgname=${NEWSORG-${ORGANIZATION-$orgname}}
  1465. + !NO!SUBS!
  1466. +     ;;
  1467. + esac
  1468.   $spitshell >>Rnmail <<'!NO!SUBS!'
  1469.   dotdir=${DOTDIR-${HOME-$LOGDIR}}
  1470.   tmpart=$dotdir/.letter
  1471. ***************
  1472. *** 140,146 ****
  1473.   
  1474.   # now build a file with a header for them to edit
  1475.       
  1476. -     orgname=${NEWSORG-${ORGANIZATION-$orgname}}
  1477.       case $orgname in
  1478.       /*) orgname=`$cat $orgname` ;;
  1479.       esac
  1480. --- 153,158 ----
  1481. Index: patchlevel
  1482. Prereq: 2
  1483. *** patchlevel    Sun Dec  1 12:11:38 1991
  1484. --- ../rn4.4.3/patchlevel    Sat Feb 22 21:53:46 1992
  1485. ***************
  1486. *** 1 ****
  1487. ! Patch:  2
  1488. --- 1 ----
  1489. ! Patch:  3 
  1490.